// 输入分数，判定成绩等级 (成绩对应等级 90-100:A级 80-89:B级 70-79:C级 60-69:D级 其它:不合格)
/**
 *    100 / 10    = 10
 *    90-99 / 10  =  9
 *    80-89 / 10  = 8
 *    70-79 / 10  = 7
 *    60-69 / 10  = 6
 *
 *
 */
var score = 88 //分数
var grade = 'A' //等级
console.log('score / 10 ',score / 10);
// parseInt(9.8) = 9
switch (parseInt(score / 10)) {
	case 10:
		grade = 'A'
		break

	case 9:
		grade = 'A'
		break

	case 8:
		grade = 'B'
		break

	case 7:
		grade = 'C'
		break

	case 6:
		grade = 'D'
		break

	default:
		grade = '不合格'
}

console.log(score + '等级是 ' + grade)
